<?php
date_default_timezone_set('PRC');

$pwd = 'Todayis:'. date("Y/m/d");//RC4加密密码为空则不加密

$bb = 1.0;//版本号
$new = 'http://momotv.cihi.im/app/momotv.apk';//更新下载地址
$newcontent = '1、本次更新了界面|2、解析优化';//更新内容
$user = 'htt://qd86668.xyz';//用户域名
$api = array(['api'=>'http://jqaaa.com/jx.php?url='],['api'=>'http://jqaaa.com/jx.php?url='],['api'=>'http://jqaaa.com/jx.php?url='],['api'=>'http://jqaaa.com/jx.php?url='],
     ['api'=> '']
,['api'=> '']
,['api'=> '']
,['api'=> '']
          );
$video_key = array(['key'=>'/video/m/|ixigua.com'],['key'=>'.m3u8?'],['key'=>'.mp4|[&pno=][&fid=][vod.do?fmt]'],['key'=>'mp4?'],['key'=>'/index.m3u8']);
$agree = '';//支持的平台[qiyi][youku][imgo],空则支持所有

/********************分享参数*****************/
$share_bt = '无极影视';//分享标题
$share_nr = '无极影视是一款免费观看全网影视的APP，随时随地想看就看。';//分享内容
$share_lj = 'https://shimo.im/docs/lr6sdLkvBBkp6RQW/';//分享连接
$share_img = 'https://s1.ax1x.com/2018/05/22/CRQQ1O.png';//分享图片

/********************分享结束*****************/

/********************幻灯片开始*****************/
$Htpa = 'http://r1.ykimg.com/051000005A742274ADC0B09694095D7A';//幻灯片的图片地址
$Hlja = 'https://d.855ts.com/20200515/93/200125/200125.mp4';//幻灯片连接
$Hbta = '血拳之双龙劫';//幻灯片标题
$Htpb = 'https://img.alicdn.com/tfs/TB1ZW31miqAXuNjy1XdXXaYcVXa-1190-410.jpg';//幻灯片的图片地址
$Hljb = 'https://d.855ts.com/20200515/93/200125/200125.mp4';//幻灯片连接
$Hbtb = '奇门遁甲';//幻灯片标题
$Htpc = 'http://5b0988e595225.cdn.sohucs.com/images/20180419/3764e5ca4ab446f9915cdc50b8c59097.jpeg';//幻灯片的图片地址
$Hljc = 'https://d.855ts.com/20200515/93/200125/200125.mp4';//幻灯片连接
$Hbtc = '超时空同居';//幻灯片标题
/********************幻灯片结束*****************/

$share = array('img'=> $share_img,'url'=> $share_lj,'title'=> $share_bt,'data'=> $share_nr);
$slide = array(['img'=> $Htpa,'url'=> $Hlja,'title'=> $Hbta],['img'=> $Htpb,'url'=> $Hljb,'title'=> $Hbtb],['img'=> $Htpc,'url'=> $Hljc,'title'=> $Hbtc]);

$arr = array ('bb'=> $bb,'user'=> rc4($pwd,$user),'interface'=> $api,'video_key'=>$video_key,'agree'=> $agree,'new'=>$new,'newcontent'=> $newcontent,'slide'=> $slide,'share' => $share);
echo json_encode($arr);

function rc4($pwd, $data) {
    $cipher = '';
    $key[] = "";
    $box[] = "";
    $pwd_length = strlen($pwd);
    $data_length = strlen($data);
    for ($i = 0; $i < 256; $i++) {
        $key[$i] = ord($pwd[$i % $pwd_length]);
        $box[$i] = $i;
    }
    for ($j = $i = 0; $i < 256; $i++) {
        $j = ($j + $box[$i] + $key[$i]) % 256;
        $tmp = $box[$i];
        $box[$i] = $box[$j];
        $box[$j] = $tmp;
    }
    for ($a = $j = $i = 0; $i < $data_length; $i++) {
        $a = ($a + 1) % 256;
        $j = ($j + $box[$a]) % 256;
        $tmp = $box[$a];
        $box[$a] = $box[$j];
        $box[$j] = $tmp;
        $k = $box[(($box[$a] + $box[$j]) % 256)];
        $cipher .= chr(ord($data[$i]) ^ $k);
    }
    return bin2hex($cipher);
}
?>